// 引入get和post
import { get, post } from './http'
/*  Login.vue  */
// 登录App
export const login = data => post('/api/app_user/app_login', data)
/*  Register.vue  */
// 注册App
export const register = data => post('/api/app_user/app_register', data)
/*  Home.vue  */
// 获取首页轮播图
export const getCarousel = () => get('/api/home/getCarousel')
// 获取推荐课程
export const getAppClass = () => get('/api/home/getAppClass')
export const getAppClassPe = () => get('/api/home/getAppClassPe')
export const changeAvatar = data => post('/api/home/changeAvatar', data)
/*  Stadium.vue  */
// 获取场馆信息列表
export const getVenue = () => get('/api/venue/getVenue')
// 搜索场馆信息
export const findVenue = data => get('/api/venue/findVenue', data)
// 搜索场馆信息
export const venueDetail = data => get('/api/venue/venueDetail', data)
/* Information.vue */
// 获取消息列表
export const getAppNotice = () => get('/api/notice/getAppNotice')
// 提交返回信息
export const addOpinion = data => post('/api/opinion/addOpinion', data)
/* AccountMsg.vue */
export const modifyNickname = data => post('/api/app_user/modifyNickname', data)

/* Leisureclass.vue */
// 获取课程列表
export const getClass = () => get('/api/class/getClass')
// 获取课程详情
export const classDetail = data => get('/api/class/classDetail', data)
// 获取评论区数据
export const commentDetail = data => get('/api/class/commentDetail', data)
// 获取私教课程
export const getPrClass = () => get('/api/class/getPrClass')

// 发布评论
export const addCommit = data => post('/api/class/addCommit', data)
// 点赞评论
export const goodCommit = data => post('/api/class/goodCommit', data)
// 预约课程
export const bookClass = data => post('/api/class/bookClass', data)
// 预约课程
export const checkCollage = data => post('/api/app_user/checkCollage', data)
